//package com.example.mybatisplus.web.controller;
//
//import com.example.mybatisplus.model.domain.Vacation;
//import com.example.mybatisplus.model.dto.DeleteDTO;
//import com.example.mybatisplus.model.dto.PageDTO;
//import com.example.mybatisplus.service.VacationService;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.stereotype.Controller;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import com.example.mybatisplus.common.JsonResponse;
//import java.util.List;
//
//@Controller
//@RequestMapping("/api/vacation")
//public class VacationController {
//
//    private final Logger logger = LoggerFactory.getLogger( VacationController.class );
//
//    @Autowired
//    private VacationService vacationService;
//
//    @PostMapping("save")
//    @ResponseBody
//    public JsonResponse save(@RequestBody Vacation vacation){
//        vacationService.rep(vacation);
//        vacationService.insert(vacation);
//        return JsonResponse.success(true);
//    }
//
//    @PostMapping("rep")
//    @ResponseBody
//    public JsonResponse rep(@RequestBody Vacation  vacation){
//        //report    拿到upTitle   upDate  upContent
//        vacationService.rep(vacation);
//        return JsonResponse.success(true);
//    }
//
//
//    @GetMapping("list")
//    @ResponseBody
//    public JsonResponse list(Vacation vacation, PageDTO pageDTO){
//        return JsonResponse.success(vacationService.listPage(vacation,pageDTO));
//    }
//
//    // 我的上报
//    @PostMapping("apply")
//    @ResponseBody
//    public JsonResponse apply(){
//        List<Vacation> apply = vacationService.apply();
//        return JsonResponse.success(apply);
//    }
//
//
//    @PostMapping("audit")
//    @ResponseBody
//    public JsonResponse audit(@RequestBody Vacation vacation){
//        vacationService.audit(vacation);
//        return JsonResponse.success(true);
//    }
//
//    @PostMapping("removeByIds")
//    @ResponseBody
//    public JsonResponse removeByIds(@RequestBody DeleteDTO deleteDTO){
//        boolean b = vacationService.removeByIds(deleteDTO.getIds());
//        return JsonResponse.success(b);
//    }
//
//}
//
